Skip to content

Persist user units from unit archive#25

Open
Tom2096 wants to merge 1 commit into
decompfrontier:mainfrom
Tom2096:dev-persistent-units
Open

Persist user units from unit archive#25
Tom2096 wants to merge 1 commit into
decompfrontier:mainfrom
Tom2096:dev-persistent-units

Conversation

@Tom2096
Copy link
Copy Markdown

@Tom2096 Tom2096 commented May 26, 2026

Summary

  • add a curated unit archive loaded at server startup from archive_root/unit.json
  • add UserUnitService helpers for inserting and reading DB-backed UserUnitInfo fields
  • seed the first placeholder unit from the archive when a user has no local units
  • enable the user_units migration and generate archive structs from packet-generator

Packet-generator schema PR: decompfrontier/packet-generator#26

Testing

  • cmake --preset debug-win64
  • cmake --build . --config Debug

@Tom2096
Copy link
Copy Markdown
Author

Tom2096 commented May 26, 2026

TLDR:

  • Added a /deploy/archive/unit.json that acts as our unit archive (similar to unit MST, except it has only fields that we understand/uses - extend in the future)
  • Added a UserArchiver global singleton that reads unit.json and supports simple lookup APIs.
  • Added a UserUnitService static class that abstracts away adding/reading units to local SQL
  • Enabled the user units migration

@Tom2096
Copy link
Copy Markdown
Author

Tom2096 commented May 26, 2026

Screenshot 2026-05-26 125249

Working - stats pulled from unit.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants